package com.subsequent.controller;

import com.subsequent.service.AssessService;
import com.subsequent.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/assess")
public class AssessController {
    @Resource
    private AssessService assessService;
    @GetMapping("/selectAssessById/{userId}")
    public Result selectAssessById(@PathVariable("userId") Integer userId){
        try {
            return assessService.selectAssessById(userId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Result.error("服务异常");
    }
}
